app.controller("checkController",function($scope, $http,$routeParams){
    $scope.pact_id=$routeParams.id;
    $http({
        method: 'POST',
        url: '/OA/enrolone2one/list?state=2',
        data:$.param({pact_id:$scope.pact_id}),
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).success(function (response) {
        $scope.enrol_datas = response.data;
        $scope.arrs=$scope.enrol_datas;
        $scope.prod={};
        $scope.findclass=function ($index) {
            $("#check").modal("show");
         $scope.prod.sn=$scope.arrs[$index].sn;
         $scope.prod.teach_5a_price=$scope.arrs[$index].teach_5a_price;
         $scope.prod.teach_8a_price=$scope.arrs[$index].teach_8a_price;
         $scope.prod.teach_director_price=$scope.arrs[$index].teach_director_price;
         $scope.prod.teach_5a_hour=$scope.arrs[$index].teach_5a_hour;
         $scope.prod.teach_8a_hour=$scope.arrs[$index].teach_8a_hour;
         $scope.prod.teach_director_hour=$scope.arrs[$index].teach_director_hour;
         $scope.prod.teach_5a_price_total=$scope.arrs[$index].teach_5a_price_total;
         $scope.prod.teach_8a_price_total=$scope.arrs[$index].teach_8a_price_total;
         $scope.prod.teach_director_price_total=$scope.arrs[$index].teach_director_price_total;
         $scope.prod.method_name=$scope.arrs[$index].method_name;
         $scope.prod.tuition_reality=$scope.arrs[$index].tuition_reality;
         $scope.prod.tuition_lack=$scope.arrs[$index].tuition_lack;
         $scope.prod.tuition_total=$scope.arrs[$index].tuition_total;
         $scope.prod.principal=$scope.arrs[$index].principal;
         $scope.prod.parents=$scope.arrs[$index].parents;
        }
    })
    // 退课单列表
    $scope.drop={}
    $http({
        method: 'POST',
        url: '/OA/dropone2one/list?state=2',
        data:$.param({pact_id:$scope.pact_id}),
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).success(function (response) {
        $scope.drop_datas = response.data;
        $scope.dropfind=function ($index) {
            $("#checkwithdraw").modal("show")
            $scope.drop.teach_5a_price=$scope.drop_datas[$index].teach_5a_price;
            $scope.drop.teach_8a_price=$scope.drop_datas[$index].teach_8a_price;
            $scope.drop.teach_director_price=$scope.drop_datas[$index].teach_director_price;
            $scope.drop.drop_5a_hour=$scope.drop_datas[$index].drop_5a_hour;
            $scope.drop.drop_8a_hour=$scope.drop_datas[$index].drop_8a_hour;
            $scope.drop.drop_director_hour=$scope.drop_datas[$index].drop_director_hour;
            $scope.drop.drop_total=$scope.drop_datas[$index].drop_total;
            $scope.drop.principal=$scope.drop_datas[$index].principal;
            $scope.drop.parents=$scope.drop_datas[$index].parents;
        }
    })
    // 缴费记录
    $http({
        method:"POST",
        url:"/OA/mend/list?state=2",
        data:$.param({pact_id:$scope.pact_id}),
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).success(function (response){
        $scope.mend_datas = response.data;
    })
    // 学员信息展示
    $http({
        method:"POST",
        url:"/OA/one2one/query",
        data:$.param({id:$scope.pact_id}),
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    }).success(function (response){
        console.log(response)
        $scope.findstudent=response.data;
    })


})

